﻿Imports EVOLTA.Promocion.Bl.Bc
Imports EVOLTA.Promocion.Bl.Be

Partial Class bienvenida
    Inherits System.Web.UI.Page

    Dim Evolta As Eevolta

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'If Not IsPostBack Then
        '    Me.Master.mostrarMenu = True
        'End If
        If Not IsPostBack Then
            Try
                If Request.QueryString("usuario") Is Nothing OrElse Request.QueryString("empresa") Is Nothing Then
                    If Me.Master.sEvolta Is Nothing Then
                        Response.Redirect(ConfigurationManager.AppSettings("cerrar").ToString)
                    End If
                Else
                    Evolta = New Eevolta
                    With Evolta
                        .mostrarMenu = Request.QueryString("menu").ToString
                        Me.Master.mostrarMenu = Request.QueryString("menu").ToString
                        .descEmpresa = Request.QueryString("empresa").ToString
                        Me.Master.descEmpresa = .descEmpresa

                        .idUsuario = CType(Request.QueryString("idUsuario"), Int32)
                        Me.Master.idUsuario = .idUsuario

                        .descUsuario = Request.QueryString("usuario").ToString
                        Me.Master.descUsuario = .descUsuario

                        .idPerfilUsuario = CType(Request.QueryString("idPerfilUsuario"), Int32)
                        Me.Master.idPerfilUsuario = .idPerfilUsuario
                    End With
                    Me.Master.sEvolta = Evolta
                End If
            Catch ex As Exception
                Response.Redirect(ConfigurationManager.AppSettings("cerrar").ToString)
            End Try
        End If
        'Me.Master.mostrarMenu = False
    End Sub

End Class
